package com.lancoo.ccas53.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lancoo.ccas53.entity.PlanTeaching;
import com.lancoo.ccas53.pojo.dto.CollegePlanDto;
import com.lancoo.ccas53.pojo.dto.CourseAndApplyDto;
import com.lancoo.ccas53.pojo.dto.PlanTeachingDto;
import com.lancoo.ccas53.pojo.vo.CourseApplyVo;
import com.lancoo.ccas53.pojo.vo.CourseType;
import com.lancoo.ccas53.pojo.vo.CourseVo;
import com.lancoo.ccas53.pojo.vo.PlanTeachingVo;

import java.util.List;
import java.util.Map;
import java.util.Optional;

/**
 * <p>
 * 教务获取教学计划,相当于专业版本 服务类
 * </p>
 *
 * @author quin.song
 * @since 2024-05-20
 */
public interface PlanTeachingService extends IService<PlanTeaching> {

    /**
     * 同步教务系统数据
     *
     * @param taskId
     */
    void syncEducational(Integer taskId, String schoolId, String term);

    /**
     * 获取教学计划
     *
     * @param param
     * @return
     */
    PlanTeachingDto getTeacherPlan(PlanTeachingVo param, Integer taskId);

    /**
     * 批量设置教学计划
     *
     * @param isEnable
     * @return
     */
    Boolean setTeacherPlan(Integer isEnable, Integer taskId, List<Long> idList);

    /**
     * 清空教学计划列表
     *
     * @param taskId
     * @return
     */
    Boolean clearTeacherPlan(Integer taskId);

    /**
     * 获取教学计划对应课程
     *
     * @param baseTeachingPlanId
     * @param flag
     * @return
     */
    List<CourseVo> getCourseByTeachingPlanId(String baseTeachingPlanId, Integer flag, Integer taskId);

    /**
     * 获取课程对应教学计划
     *
     * @param baseCourseId
     * @return
     */
    List<PlanTeaching> getTeachingPlanByCourse(String baseCourseId, Integer taskId);

    /**
     * 获取课程类别
     *
     * @param flag
     * @return
     */
    List<CourseType> getCourseType(String flag, Integer taskId);

    /**
     * 获取审核开课变更列表
     *
     * @param param
     * @return
     */
    CourseAndApplyDto getCourseAndApply(CourseVo param, Integer taskId);

    /**
     * 申请开课变更
     *
     * @param param
     * @return
     */
    Object dealCourseApply(CourseApplyVo param, Integer taskId);

    /**
     * 获取增开课程列表
     *
     * @param collegeId
     * @param keyword
     * @return
     */
    List<CourseVo> getAddCourses(String collegeId, String keyword, Optional<Integer> flag, Integer taskId);

    /**
     * 开课变更审核
     *
     * @param applyId
     * @param reviewComment
     * @param examine
     * @return
     */
    Boolean examineApply(Integer applyId, String reviewComment, Integer examine, String authorization, String userId, String userName, Integer taskId);

    /**
     * 添加教学计划课程对应关系
     *
     * @param taskId
     * @param baseTeachingPlanId
     * @param baseCourseId
     * @param flag
     * @return
     */
    Object addPlanCourse(Integer taskId, String baseTeachingPlanId, String baseCourseId, String remark, Integer flag);

    /**
     * 统计开课计划
     *
     * @param baseCollegeId
     * @return
     */
    Map<String, Object> publishStatistics(String baseCollegeId, Integer taskId);

    /**
     * 发布开课计划
     *
     * @return
     */
    Boolean publishPlan(Integer taskId, String userId, String userName, String baseCollegeId);

    /**
     * 查看提交记录
     *
     * @param baseCollegeId
     * @param taskId
     * @return
     */
    List<CollegePlanDto> getPublishRecord(String baseCollegeId, Integer taskId, Integer type);


}
